package com.example.environment.controller;

import com.example.environment.service.CityService;
import com.example.environment.tools.common.ResultMsg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/city")
public class CityController {
    @Autowired
    private CityService cityService;

    @GetMapping("/getByProvince")
    public ResultMsg getCityByProvince(Integer provinceId){
        return cityService.getCityByProvince(provinceId);
    }

}
